#include "ExitData.h"
#include "HttpServer.hpp"
#include <memory>

void Usage(std::string proc)
{
    std::cout << "\n\tUsage: " << proc << "[proc]+1024" << std::endl;
}

int main(int args, char* argv[])
{
    if(args != 2){
        Usage(argv[0]);
        exit(UsageExit);
    }
    int port = std::stoi(argv[1]);

    std::unique_ptr<HttpServer> http_server(new HttpServer(port));
    http_server->InitHttpServer();
    http_server->Loop();
    return 0;
}